package com.cs.user.infra.basic.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cs.user.infra.basic.mapper.PermissionMapper;
import com.cs.user.infra.basic.entity.Permission;
import com.cs.user.infra.basic.service.PermissionService;
import org.springframework.stereotype.Service;

/**
 * 权限表(AuthPermission)表服务实现类
 *
 * @author makejava
 * @since 2024-09-24 15:06:10
 */
@Service("authPermissionService")
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements PermissionService {

    @Override
    public Boolean addPermission(Permission permission) {
        return save(permission);
    }

    @Override
    public Boolean deletePermission(Permission permission) {
        permission.setIsDelete(1);
        return updateById(permission);
    }

    @Override
    public Boolean updatePermission(Permission permission) {
        return updateById(permission);
    }
}

